<html>
<head>
<!-- Copyright (c) GoAhead Software Inc., 1995-2010. All Rights Reserved. -->
<title>umAddGroup -- GoAhead WebServer API</title>
<link rel="stylesheet" href="../../../style/doc.css" type="text/css">
</head>

<body>
<TABLE class=apitable BORDER="0" BORDERCOLOR="#FFFFFF" BGCOLOR="#FFFFFF"><TR BORDERCOLOR="#FFFFFF"><TD>

<TABLE border=0 width=100% cellspacing=0 cellpadding=0 CLASS="apiTitle"> <TR> 
<td class="titleLeft" align=left width="33%">umAddGroup</TD><td class="titleCenter" align=center width="33%"><b>GoAhead 
WebServer API</b></TD><td class="titleRight" align=right width="33%"><B>GoAhead 
EMF</B></TD></TR> </TABLE><HR><H2><B>Synopsis</B></H2><P>	Add a group to the User Management database in the group table.</P><H2><B>Prototype</B></H2><PRE>
 #include &quot;um.h&quot; 


 int umAddGroup( char_t * group, 
     short privilege, 
     accessMeth_t am, 
     bool_t protect, 
     bool_t disabled);</PRE><H2><B>Parameters</B></H2><blockquote><TABLE WIDTH="89%" BORDER="0"><TR><TD HEIGHT="21" WIDTH="17%">group</TD><TD HEIGHT="21" WIDTH="83%">Group name.</TD></TR><TR><TD WIDTH="17%" HEIGHT="16">privilege</TD><TD WIDTH="83%" HEIGHT="16">Bit mask for privilege as noted below.</TD></TR><TR><TD WIDTH="17%">am</TD><TD WIDTH="83%">Access method as noted below.</TD></TR><TR><TD WIDTH="17%">protect</TD><TD WIDTH="83%">Delete protection; value is TRUE if protected.</TD></TR><TR><TD WIDTH="17%">disabled</TD><TD WIDTH="83%">TRUE if group is disabled; FALSE if group is enabled.</TD></TR></TABLE></blockquote><H2><B>Description</B></H2><P>	Privileges are determined by bit-masking the following constants:<BR>PRIV_NONE - user has no privileges<BR>PRIV_READ - user can read files<BR>PRIV_WRITE - user can execute CGIs<BR>PRIV_ADMIN - user can administrate </P><P>	Access method can be one of the following:<BR>		AM_NONE  - Group has no access to anything<BR>		AM_FULL - Group has access to all pages; no authorization required<BR>		AM_BASIC - group requires at least basic authentication<BR>		AM_DIGEST - group requires at least digest authentication<BR>		AM_INVALID - not a valid access method</P><H2><B>Return Value</B></H2><P>	umAddGroup returns 0 if successful or  -1 on error.</P><H2><B>Example</B></H2><PRE>Int nCheck = umAddGroup(T(&quot;users&quot;), 0x07, AM_DIGEST, TRUE, FALSE);</PRE><H2><B>See Also</B></H2><P>	<A HREF="umDeleteGroup.htm">umDeleteGroup</A>()</P><H2>&nbsp;</H2><P>&nbsp;</P></TD></TR></TABLE>
</body>
</html>
